﻿@model IEnumerable<Kaqaz.Entities.Comment>
@{
    ViewBag.Title = "Unapproved Comments";
}
<h2>@Resource.UnapprovedComments</h2>
<div class="comments">
    @foreach (var item in Model)
    {
        <text>
        <div class="comment-placeholder">
            <div class="comment-name">
                @if (!string.IsNullOrWhiteSpace(item.Website))
                {
                    <a href="@(item.Website.ToLower().StartsWith("http://") ? item.Website : "http://" + item.Website)">
                        @item.Name
                    </a>
                }
                else
                {
                    @item.Name
                }

            </div>
            <div class="comment-content-placeholder">
                <div class="comment-email">
                    @item.Email
                </div>
                <div class="comment-createtime">@GlobalDateTime.ToLongDateTimeString(item.CreateTime)</div>
                <div class="comment-commands">
                    <a href="@Url.Action("Approve", new { id = item.Id })" class="no-underline">
                        <img src="@Url.Content("~/Content/Images/Icons/Accept.png")" alt="@Resource.Edit" />
                    </a>
                    <a href="@Url.Action("Delete", new { id = item.Id })" onclick="return confirm('@Resource.DeleteConfirmMessage')" class="no-underline">
                        <img src="@Url.Content("~/Content/Images/Icons/Delete.png")" alt="@Resource.Delete" />
                    </a>
                </div>
                <div class="comment-relatedpost">
                [@Html.ActionLink("پست", "Details", "Post", new { id = @item.PostId }, new { target = "_blank" })]
                </div>
                <div class="comment-content">
                    @item.Content
                </div>
            </div>
            <div class="clear"></div>
        </div>
        </text>
    }
</div>
